<template>
	<div id="slideshow">
		<van-swipe :autoplay="3000">
			<van-swipe-item v-for="(image, index) in images" :key="index">
				<img v-lazy="image" style="width: 100%;height: 100%;border-radius: 30px;"/>
			</van-swipe-item>
		</van-swipe>
	</div>
</template>

<script>
	import {mapGetters} from 'vuex'
	export default
	{
		data() 
		{
		    return {
				images: [
					'./images/1.jpg',
					'./images/2.jpg'
				]
			}
		},
		computed:
		{
			...mapGetters([
				'song'
			])
		},
		created()
		{
			this.$nextTick(function()
			{
				this.$store.dispatch("picture/vuexSong","轮播图")
				.then(e=>
				{
					console.log(e)
				})
			})
		}
	}
</script>

<style>
	#slideshow{
		width: 90%;
		height: 300px;
		margin-top: 20px;
		margin-left: 5%;
		border-radius: 50px;
	}
	.van-swipe .van-swipe-item {
		width: 10%;
		height: 300px;
	}
</style>
